package com.cory.admin.sys.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cory.module.oplog.core.annotation.OpLogAttr;
import com.cory.module.oplog.core.annotation.OpLogObject;

/**
 * 
 *
 * @author xc
 * @since 2022-01-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@OpLogObject(name="部门")
public class SysDept implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户标记
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 租户id
     */
    private Integer tenantId;
    
    /**
     * 用户类型 
     */
    private Integer userType;

    /**
     * 名称
     */
    @OpLogAttr(name="名称")
    private String name;

    /**
     * 名称
     */
    private String code;

    private String parent;

    private Integer sort;

    /**
     * 1启用，2禁用，9删除
     */
    private Integer state;

    /**
     * 新增人员
     */
    @TableField(fill = FieldFill.INSERT)
    private Integer createUser;

    /**
     * 新增时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 最近修改人员
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer modifyUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    /**
     * 备注
     */
    private String remarks;


}
